
function submitsearch()
{
	c = document.getElementById('category_id');
	s = document.getElementById('searchfield');
	sb = document.getElementById('sort_by');
	p = document.getElementById('price');
	show = document.getElementById('show');
	prefer = document.getElementById('preference');
	
	$.ajax({
		url : base_url+ "browse/search_result",
		type : 'post',
		data :
		{
			category : c.value,
			search : s.value,
			sort_by : sb.value,
			show : show.value,
			price : p.value,
			preference : prefer.checked,
		},
		dataType : 'json',
		success : function (response)
		{

			searchresults = response;
			curr_page = 1;
			per_page = 16;
			num_pages = Math.ceil(searchresults.length / per_page);
			if(num_pages == 0){
				num_pages = 1;
			}
			
			makePaginator();
			DisplayPage(curr_page);
			positionPaginator();
			$(".resize-150").load(function(){
				resize($(this), 150);
			});
			replaceIdByName();
			replaceIdByPic();
			
		}
	});
}